package design.patterns.exercise;

/**
 * @Desc:   线程安全的单例模式
 * @author: cww
 * @DateTime: 2020-04-17 18:57
 */

public class SingletonLazySafety {
    private SingletonLazySafety() {
    }
    private static class Hold{
        static SingletonLazySafety inner = new SingletonLazySafety();
    }
    public static SingletonLazySafety getInstance(){
        return Hold.inner;
    }
}
